/*---------------------------------------------------------------------------------------------------------*/
/*                                                                                                         */
/* Copyright(c) 2016 Nuvoton Technology Corp. All rights reserved.                                         */
/*                                                                                                         */
/*---------------------------------------------------------------------------------------------------------*/

//***********************************************************************************************************
//  Nuvoton Technoledge Corp. 
//  Website: http://www.nuvoton.com
//  E-Mail : MicroC-8bit@nuvoton.com
//  Date   : Apr/21/2016
//***********************************************************************************************************

//#include "N76E003.h"
#include "STC89C52.H"
#include "Delay.h"
#include "SFR_Macro.h"
#include "Function_define.h"
bit BIT_TMP;


//-------------------------------------------------------------------------
/*void Timer0_Delay100us(UINT32 u32CNT)
{
    unsigned char i;

	_nop_();
	i = 43;
	while (--i);    			        //Stop Timer0
}*/


void stcDelay1ms(void) {
	unsigned char i, j;

	_nop_();
	i = 2;
	j = 199;
	do
	{
		while (--j);
	} while (--i);         		  //Stop Timer0
}


//------------------------------------------------------------------------------
void Timer0_Delay1ms(UINT32 u32CNT)
{
   uint32_t i = 0;
	for(i = 0; i < u32CNT; i++) {
		stcDelay1ms();
	}
}
/*
//------------------------------------------------------------------------------
void Timer1_Delay10ms(UINT32 u32CNT)
{
    unsigned char i, j;

	i = 18;
	j = 235;
	do
	{
		while (--j);
	} while (--i);
}
//------------------------------------------------------------------------------
void Timer2_Delay500us(UINT32 u32CNT)
{
    unsigned char i;

	_nop_();
	i = 227;
	while (--i);            		//Stop Timer2
}
//------------------------------------------------------------------------------
void Timer3_Delay100ms(UINT32 u32CNT)
{
    unsigned char i, j;

	i = 180;
	j = 73;
	do
	{
		while (--j);
	} while (--i);              		//Stop Timer3
}
//------------------------------------------------------------------------------

void Timer3_Delay10us(UINT32 u32CNT)
{
    unsigned char i;

	i = 2;
	while (--i);              		//Stop Timer3
}
*/
